package com.weiadmin.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weiadmin.common.PageParam;
import com.weiadmin.model.system.UserModel;

/**
 * 功能描述
 *
 * @author: shizhongyu
 * @date: 2023年05月29日 11:09
 */
public interface UserDao extends BaseMapper<UserModel> {
    default Page<UserModel> getList(PageParam pageParam){

        Page<UserModel> pager = new Page<>(pageParam.getPage(), pageParam.getLimit());
        QueryWrapper<UserModel> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("id");
        return selectPage(pager, queryWrapper);
    }
}
